.my-name-container {
  display: inline-block;
  text-align: center;
}

.my-name {
  font-size: 4rem;
    font-family: "JetBrains Mono", monospace;
    font-weight: 400;
  color: white;
  border-right: 4px solid;
  width: 0;
  white-space: nowrap;
  overflow: hidden;
  animation: 
    my-name-typing 2s steps(13) forwards,
    my-name-hide-caret 0s linear 2.1s forwards;
  user-select: none;
}

/* typing effect */
@keyframes my-name-typing {
  to {width: 13ch;}
}

/* hide caret after typing */
@keyframes my-name-hide-caret {
  to {
    border-color: transparent;
  }
}

.my-profession {
  display: inline-block;
  font-size: 1.5rem;
    font-family: "JetBrains Mono", monospace;
    font-weight: 300;
  color: white;
  border-right: 4px solid transparent;
  margin-top: 10px;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  width: 0;
  animation:
    my-profession-typing 2s steps(17) forwards 2s,
    my-profession-caret .1s linear 2s forwards,
    my-profession-hide-caret .2s linear 4.25s forwards;
}

@keyframes my-profession-typing {
  to {width: 17ch;}
}

@keyframes my-profession-caret {
  to {
    border-color: white;
  }
}

@keyframes my-profession-hide-caret {
  to {
    border-color: transparent;
  }
}



@media screen and (max-width: 600px) {
  .my-name {
    font-size: 3rem;
  }
  
  .my-profession {
    font-size: 1.2rem;
  }
}

@media screen and (max-width: 400px) {
  .my-name {
    font-size: 2.5rem;
  }
  
  .my-profession {
    font-size: 1rem;
  }
}
